<template>
    <div class="cart_header">
        <span @click="delBtn">{{bool?'编辑':'完成'}}</span>
        <section>购物车</section>
        <span @click="show">筛选</span>
    </div>
</template>
<script>
import { ref } from 'vue';
export default {
  setup(props,ctx) {
    const bool = ref(true);
    const delBtn = () => {
        bool.value = !bool.value;
        ctx.emit('delBtn');
    }
    const show = () => {
        ctx.emit('show');
    }
    return{
        show,
       delBtn,
       bool 
    }
  }
}
</script>
<style lang="scss" scoped>
    .cart_header{
      display: flex;
      height: 50px;
      align-items: center;
      background: chocolate;
      justify-content: space-between;
      color: #fff;
      padding: 0 10px;
    }
</style>